A network processor generally controls the flow of packets between a physical transmission medium, such as a physical layer portion of, e.g., an asynchronous transfer mode (ATM) network or synchronous optical network (SONET), and a switch fabric in a router or other type of packet switch. Such routers and switches generally include multiple network processors, e.g., arranged in the form of an array of line or port cards with one or more of the processors associated with each of the cards.
In a network processor, it is important to maintain an appropriate processing order for incoming or outgoing packets. For example, many of the processing tasks in a network processor are order-dependent tasks in that the result of a given operation is required for the correct execution of a subsequent operation. Such operations are typically initiated by function calls to one or more operational units of the processor. A given operational unit may include multiple execution units, each capable of executing operations for the operational unit. An example of one type of operational unit is a computational unit that performs particular computational operations in response to requests for such operations.
Conventional techniques for maintaining a desired function call sequencing in a network processor include serialization of function call dispatch, or a scalar approach involving a single execution unit.
In the serialization approach, function calls to different operational units are dispatched in a serial manner in accordance with a specified function call sequencing. In other words, an appropriate function call sequence is determined, and the function calls are dispatched in a serial manner so as to maintain the desired sequence. A function call that requires a result from another function call simply waits until the result is available before being dispatched to a particular operational unit. This approach maintains some of the advantages of parallelism through the use of multiple operational units, but fails to fully exploit such parallelism in increasing network processor throughput.
The scalar approach circumvents the issue of maintaining a proper processing sequence altogether by utilizing only a single operational unit. While this approach does ensure a proper processing sequence, it severely restricts the throughput of the network processor by eliminating any gains attributable to parallelism.
Thus, both of the conventional approaches described above are deficient in that they fail to provide maximum network processor throughput. These deficiencies become increasingly apparent at high data rates, e.g., data rates at or above 2.5 Gigabits per second (Gbps).
A need therefore exists for improved techniques for maintaining a desired function call sequence for order-dependent processing tasks in a network processor or other type of processor, in a manner which increases processor throughput by more efficiently exploiting parallelism between operational units of the processor.